<template>
  <div class="">

    <ELTable v-bind="configTable">

        <template #search="{ searchSubmit, params }">
        <div>
          <el-form :inline="true" class="demo-form-inline">
            <el-form-item label="关键字">
              <el-input v-model="params.key" placeholder="请输入关键字" />
            </el-form-item>
            <el-form-item label="">
              <el-button type="primary" @click="searchSubmit">查询</el-button>
            </el-form-item>
          </el-form>
        </div>
      </template>


        <template #buttons="{ deleteAllHandle }">
        <div>
          <el-button type="danger" @click="deleteAllHandle">删除</el-button>
        </div>
      </template>
        <template #operate="{ scope, delrow }">
        <div>
          <el-button type="danger" @click="delrow(scope.row.id)">删除</el-button>
        </div>
      </template>
    </ELTable>
  </div>
</template>

<script lang='ts' setup>
import { ref,watch,reactive } from "vue"
import ELTable,{TableType} from "../../components/ELTable.vue";
import { getmember,memberdelete,memberdeleteall } from '../../service/member/member'
import { column } from './member'

const configTable: TableType = reactive({
    column: column,
    isSelection: true,
    loadData: getmember,
    delDate:memberdelete,
    delallDate:memberdeleteall,
    searchParams:{
      state:0
    }
})
</script>

<style  scoped>
</style>
